package com.sesurity.controller;

import com.sesurity.domain.User;
import com.sesurity.service.LoginServcie;
import com.sesurity.utils.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController("user")
public class LoginController {

    @Autowired
    private LoginServcie loginServcie;

    @GetMapping("/login")
    public ResponseResult login(@RequestBody User user){

       // return loginServcie.login(user);

        System.out.println("前端传输成功");
        return loginServcie.login(user);
    }



}
